﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Catalog_priview.aspx.cs" Inherits="newBlog.admin.article.Catalog_priview" %>

<%@ Register Src="~/model/allLink.ascx" TagPrefix="uc1" TagName="allLink" %>
<% 
    if (Session["user_id"]==null) {
        Response.Write("{\"error\":\"您未登录本站\"}");
        return;
    }
    if (Convert.ToInt32(Session["user_grade"])!=1) { 
    Response.Write("{\"error\":\"您不是管理员\"}");
        return;
    }
    %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>分类管理-<%=Application["title"] %></title>
    <meta name="description" content="<%=Application["content"] %>">
    <meta name="keywords" content="<%=Application["key"] %>">
    <uc1:allLink runat="server" ID="allLink" />
    <script src="/js/admin/Catalog_priview.js"></script>
</head>
<body>
      <div class="layui-row">
      <div class="layui-col-md8 layui-col-md-offset2">
      <div class="layui-tab">
        <ul class="layui-tab-title">
          <li class="layui-this">删除分类</li>
          <li>添加分类</li>
          <li>修改分类</li>
        </ul>
        <div class="layui-tab-content">
        <div class="layui-tab-item layui-show layui-col-space10">
        <div class="layui-col-md2"><input type="text" id="delCatalogID" required lay-verify="required" placeholder="分类ID" autocomplete="off" class="layui-input" disabled></div>
        <div class="layui-col-md2"><input type="text" id="delCatalogName" required lay-verify="required" placeholder="分类名称" autocomplete="off" class="layui-input" disabled></div>
        <div class="layui-col-md2"><input type="text" id="delCatalogContent" required lay-verify="required" placeholder="分类描述" autocomplete="off" class="layui-input" disabled></div>
        <div class="layui-col-md2"><button type="button" class="layui-btn layui-btn-fluid" onclick="DelCatalog()">删除分类</button></div>
        </div><!--删除分类的内容-->
        <div class="layui-tab-item layui-col-space10">
        <div class="layui-col-md2"><input type="text" id="AddCatalogName" required lay-verify="required" placeholder="请输入分类名称" autocomplete="off" class="layui-input"></div>
        <div class="layui-col-md2"><input type="text" id="AddCatalogContent" required lay-verify="required" placeholder="请输入分类描述" autocomplete="off" class="layui-input"></div>
        <div class="layui-col-md2"><button type="button" class="layui-btn layui-btn-fluid" onclick="AddCatalog()">确认添加</button></div>
        </div><!--添加分类的内容-->
        <div class="layui-tab-item layui-col-space10 ">
        <div class="layui-col-md2"><input type="text" id="ModifyCatalogID" required lay-verify="required" placeholder="请输入分类ID" autocomplete="off" class="layui-input" disabled></div>
        <div class="layui-col-md2"><input type="text" id="ModifyCatalogName" required lay-verify="required" placeholder="请输入分类名称" autocomplete="off" class="layui-input"></div>
        <div class="layui-col-md2"><input type="text" id="ModifyCatalogContent" required lay-verify="required" placeholder="请输入分类描述" autocomplete="off" class="layui-input"></div>
        <div class="layui-col-md2"><button type="button" class="layui-btn layui-btn-fluid" onclick="ModifyCatalog()">确认修改</button></div>
        </div><!--修改分类的内容-->
        </div>
      </div>
</div>
</div>
    <div class="layui-row RowSpace">
    <div class="layui-col-md6 layui-col-md-offset3">
    <table id="CatalogList" lay-filter="CatalogList"></table>
    <script>
    RenderTable('#CatalogList','','/CenterInc/view_json/admin/Catalog_preview_json.aspx',true,[[
        {field: 'caozuo', title: '操作', fixed: 'left',type:'radio'}
                     ,{field: 'Id', title: 'ID', sort: true}
                     ,{field: 'Name', title: '分类名称'}
                     ,{field: 'Content', title: '分类描述', sort: true}

    ]],20);
    catalog_redio_click();
</script>
</div>
</div>
</body>
</html>
